package com.ray.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class HelloHandler {

    @RequestMapping("/index")
    public String index(){
        System.out.println("执行了index...");
        return "index";
    }


    @RequestMapping("/getName")
    @ResponseBody
    public String getName(String name){
        System.out.println("执行了getName..."+name);
        return name;
    }
}
